package com.Enumeration枚举类;

public class 枚举类的引出 {
    public static void main(String[] args) {
        Season spring = new Season("春天", "春暖花开");
        Season summer = new Season("夏天", "夏日炎炎");
        Season autumn = new Season("秋天", "秋高气爽");
        Season winter = new Season("冬天", "寒冷至极");

        Season hsp    = new Season("雨天", "芭比巴伯");
        /***
         * 对于季节而言它的对象是固定的四个不会有更多 而这个设计类不能体现季节是固定的四个对象
         * 就比如说你随便创建一个雨天随便给他一个形容词他都能创建 Season hsp    = new Season("雨天", "芭比巴伯");
         * 但因为季节是固定的四个 这样设计是失败的 所以引出====》》枚举类
         * 我们需要创建的season对象由如下特点
         * 1.季节的值是有限的几个值比如，春天，夏天，秋天，冬天，
         * 2.只读，不能修改
         *
         */


    }
}
/**
 * 需求：要求创建季节season 对象请设计并完成 季节类
 */
class Season {
    //1.声明Season对象的实例变量
    private String name;
    private String desc;

    public Season(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}